HADOOP_HOME=/home/kelvin/hadoop

jar: compile
	cd bin; jar cf ../boolean_retrieval.jar *; cd ..

compile: src/kelvin/booleanretrieval/BooleanRetrieval.java
	javac -classpath $(HADOOP_HOME)/hadoop-core-0.20.203.0.jar:$(HADOOP_HOME)/lib/commons-cli-1.2.jar src/kelvin/booleanretrieval/BooleanRetrieval.java -d bin/

run: jar
	- $(HADOOP_HOME)/bin/hadoop dfs -rmr boolean_retrieval/output
	$(HADOOP_HOME)/bin/hadoop jar boolean_retrieval.jar kelvin.booleanretrieval.BooleanRetrieval inverted_index/output boolean_retrieval/output $(queries)

output:
	$(HADOOP_HOME)/bin/hadoop dfs -cat boolean_retrieval/output/part*
